package io_exercise;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OISDemo2 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis2=new FileInputStream("student2.obj");
        ObjectInputStream ois2=new ObjectInputStream(fis2);
        Object obj2=ois2.readObject();
        Student2 ls=(Student2)obj2;
        System.out.println(ls);
        ois2.close();
    }
}
